package com.cqc.other.classConstruct;

/**
 * @author cui
 * @date 2023/8/17 20:06
 * @description
 **/
public class Son extends Parent {

    private String username = "son";

    public Son() {
        System.out.println("Son无参构造方法，" + this.getClass().getName());
    }

    public Son(String username) {
        super(username);
        this.username = username;
        System.out.println("Son有参构造方法，" + this.getClass().getName() + ",username=" + username);
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }


    protected void f1() {
        System.out.println("Son.f1()");
    }
    protected void f2() {
        System.out.println("Son.f2()");
    }
}
